import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    city: '南宁',
    descValue: '',
    goodPrice: '',
    goodWeight: '',
    goodCar: '不限载具',
    goodType: '',
    sendAddress: '',
    getAddress: '',
    sendMethod: '',
    getGoodTime: ''
  },
  mutations: {
    changeVal (state, val) {
      state.descValue = val
    },
    changePrice (state, val) {
      state.goodPrice = val
    },
    changeWeight (state, val) {
      state.goodWeight = val
    },
    changeCar (state, val) {
      state.goodCar = val
    },
    changeType (state, val) {
      state.goodType = val
    },
    changeSendAddress (state, val) {
      state.sendAddress = val
    },
    changeGetAddress (state, val) {
      state.getAddress = val
    },
    changeSendMethod (state, val) {
      state.sendMethod = val
    },
    changeGoodTime (state, val) {
      state.getGoodTime = val
    }
  }
})
